package top.psjj.mall.exception;

/**
 * 统一异常信息枚举
 */
public enum MallExceptionEnum {
    NEED_USERNAME(10001,"用户名不能为空"),
    NEED_PASSWORD(10002,"密码不能为空"),
    PASSWORD_LEN_SHORT(10003,"密码长度不能小于6"),
    EXISTS_NAME(10004,"名字已经存在"),
    LOGIN_FAIL(10005,"用户名或密码错误"),
    NEED_LOGIN(10006,"请登录"),
    NEED_ADMIN(10007,"需要管理员身份登陆"),
    METHOD_ARG_NOT_VALID(10008,"校验失败"),
    DIR_EXISTS(10009,"目录不存在"),
    UPLOAD_FAIL(10010,"上传失败"),
    NOT_SELL(10011,"未售卖"),
    NEED_STOCK(10012,"缺货"),
    UPDATE_FAILED(10013,"更新失败"),
    DELETE_FAILED(10014,"删除失败"),
    NOT_EXISTS(10015,"不存在"),
    CART_IS_EMPTY(10016,"购物车为空"),
    NOT_ORDER(10017,"订单为空"),
    ORDER_NOT_YOUR(10018,"不是你的订单"),
    WRONG_ORDER_STATUS(10019,"订单状态错误")
    ;
    private Integer status;
    private String msg;

    MallExceptionEnum(Integer status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
